public class Test {

	public static void reverse(int[] array)
	{
		int i=0;
		int j=array.length-1;
		while (i<j)
		{
			int temp=array[i];
			array[i]=array[j];
			array[j]=temp;
			i++;
			j--;
		}
	}

	public static void func(int[] array)
	{
		for(int i=0;i<array.length;i++)
		{
			array[i]*=2;
		}

	}
	public static void main(String[] args) {
		int[] array={1,2,3,4,5};
		for(int i=0;i<array.length;i++)
		{
			System.out.printf(array[i]+" ");
		}
		System.out.println( );
		reverse(array);
		for(int i=0;i<array.length;i++)
		{
			System.out.printf(array[i]+" ");
		}
		System.out.println();
		func(array);
		for(int i=0;i<array.length;i++)
		{
			System.out.printf(array[i]+" ");
		}
	}
}
